<?php
class UserDataForm extends BasePublicUserForm
{


   public function configure()
   {

		$this->setNameFormat();
		$this->useFields(array( 'first_name', 'last_name', 'phone', 'birth_year', 'birth_month', 'birth_day' ));

		$this->validatorSchema['first_name'] =  new sfValidatorString(array('required' => true), array('required' => 'First name required'));
		$this->validatorSchema['last_name'] =  new sfValidatorString(array('required' => true), array('required' => 'Last name required'));
		$this->validatorSchema['phone'] =  new sfValidatorString(array('required' => false) );
		$this->validatorSchema['birth_year'] =  new sfValidatorString(array('required' => false) );
		$this->validatorSchema['birth_month'] =  new sfValidatorString(array('required' => false) );
		$this->validatorSchema['birth_day'] =  new sfValidatorString(array('required' => false) );



   }

   public function setNameFormat(){
   		$this->widgetSchema->setNameFormat('user_data[%s]');
   }
}